﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PrintLabel.Tools
{
    public class KillSelf
    {
        public static void Kill()
        {
            var curr = Process.GetCurrentProcess();
            var pro = Process.GetProcessesByName(curr.ProcessName);
            foreach (var p in pro)
            {
                p.Kill();
            }
            pro = null;
            //Dim proc() As Process
            //proc = Process.GetProcessesByName("打卷检验")
            //For Each p In proc
            //    p.Kill()
            //Next
            //proc = Nothing
        }
    }
}
